﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ExamSystem.Mdeol;
using ExamSystem.BLL;
namespace ExamSystem.ht
{
    public partial class TKecheng_List : System.Web.UI.Page
    {
        private TkechengBLL tb = new TkechengBLL();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                try
                {
                    string tcid = Request.QueryString["id"];
                    if (!string.IsNullOrEmpty(tcid))
                    {
                        tb.delete(int.Parse(tcid));
                        util.FunHelper.LayerAlter(this, "删除成功", "TKecheng_List.aspx");
                    }
                }
                catch
                {
                    util.FunHelper.LayerAlter(this, "删除失败", "TKecheng_List.aspx");
                }


                List<Tkecheng> list = tb.selectkckecheng();

                //绑定数据源
                this.Repeater1.DataSource = list;
                //绑定数据
                this.Repeater1.DataBind();
                this.lbTotal.InnerText = list.Count.ToString();
            }
        }
    }
}